<?
$id += 0;
$news = new News();
$news->select($id);
$link = "http://".$_SERVER['HTTP_HOST']."/tin-tuc-chi-tiet/$id/";
?>
<div class='tour_left'>
	<div class='title_1 cufon' style='width:595px;'>
        Tin tức - Sự kiện
    </div>
    <div class='news_title'><?=$news->getname()?></div>
    
    <div class='tour_content' style='color:#666;font-style:oblique;'>
    	<?=$news->getdescription()?>
    </div>
    
    <div class='tour_content'>
    	<?=$news->getcontent()?>
    </div>
    
    <?
	$news_arr = News::getAllNews(1,"created_at DESC");
	if (sizeof($news_arr) > 0)
	{
		$cnt = 0;
	?>
        <div class='noi_dung_tin'>
            <?
			foreach ($news_arr as $news_other)
            {
				if (($news_other->getid() < $id))
				{
					$cnt ++;
					if ($cnt > 5)
						break;
					if ($cnt == 1)
						echo "<div class='news_title'>Những tin tức cũ hơn: </div>";
            ?>
                <div style='line-height:18px;padding-left:10px;'><a class='a_news' href="/tin-tuc-xem/<?=$news_other->getid()?>/<?=lg_string::get_link($news_other->getname())?>">&raquo; &nbsp;<?=$news_other->getname()?> (đăng ngày <?=lg_date::dmy2ymd($news_other->getcreated_at())?>)</a></div>
            <?
				}
            }
			
            foreach ($news_arr as $news_other)
            {
				if (($news_other->getid() != $id) && ($news_other->getactive() != 0))
				{
					$cnt ++;
					if ($cnt > 5)
						break;
					if ($cnt == 1)
						echo "<div class='news_title'>Những tin tức khác: </div>";
            ?>
                <div style='line-height:18px;padding-left:10px;'><a class='a_news' href="/tin-tuc-xem/<?=$news_other->getid()?>/<?=lg_string::get_link($news_other->getname())?>">&raquo; &nbsp;<?=$news_other->getname()?> (đăng ngày <?=lg_date::dmy2ymd($news_other->getcreated_at())?>)</a></div>
            <?
				}
            }
            ?>
        </div>
    <?
	}
	?>
    
</div>
<div class='tour_right'>
<?
include('z_includes/news_right.php');
?>
</div>
<div style='clear:both'></div>

<style>
	.news_title
	{
		font-weight	: bold;
		font-size 	: 12px;
		padding		: 10px 0;
		color		: #CF0000;
	}
</style>